First, attributes can be NULL (which is always the case when calling
gdk_window_ensure_native) so do not unconditionally dereference it.
Then the window_type should be taken directly from the GdkWindow as
in other backends (such as the X11 one for example).
https://bugzilla.gnome.org/show_bug.cgi?id=744942
impl->view = NULL;
- switch (attributes->window_type)
+ switch (window->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP:
window->width,
window->height);
- if (attributes->window_type == GDK_WINDOW_TEMP ||
- attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
+ if (window->window_type == GDK_WINDOW_TEMP ||
+ ((attributes_mask & GDK_WA_TYPE_HINT) &&
+ attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
{
style_mask = NSBorderlessWindowMask;
}